package sm.dbdict.def;

public class StructureArrayOptions implements Cloneable {
	private Boolean sa_unique_key;

	private String sa_unique_filename;

	private String sa_attribute_file;

	private Boolean temporal;

	public Boolean getSa_unique_key() {
		return sa_unique_key;
	}

	public void setSa_unique_key(Boolean sa_unique_key) {
		this.sa_unique_key = sa_unique_key;
	}

	public String getSa_unique_filename() {
		return sa_unique_filename;
	}

	public void setSa_unique_filename(String sa_unique_filename) {
		this.sa_unique_filename = sa_unique_filename;
	}

	public String getSa_attribute_file() {
		return sa_attribute_file;
	}

	public void setSa_attribute_file(String sa_attribute_file) {
		this.sa_attribute_file = sa_attribute_file;
	}

	public Boolean getTemporal() {
		return temporal;
	}

	public void setTemporal(Boolean temporal) {
		this.temporal = temporal;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((sa_attribute_file == null) ? 0 : sa_attribute_file
						.hashCode());
		result = prime
				* result
				+ ((sa_unique_filename == null) ? 0 : sa_unique_filename
						.hashCode());
		result = prime * result
				+ ((sa_unique_key == null) ? 0 : sa_unique_key.hashCode());
		result = prime * result
				+ ((temporal == null) ? 0 : temporal.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		StructureArrayOptions other = (StructureArrayOptions) obj;
		if (sa_attribute_file == null) {
			if (other.sa_attribute_file != null)
				return false;
		} else if (!sa_attribute_file.equals(other.sa_attribute_file))
			return false;
		if (sa_unique_filename == null) {
			if (other.sa_unique_filename != null)
				return false;
		} else if (!sa_unique_filename.equals(other.sa_unique_filename))
			return false;
		if (sa_unique_key == null) {
			if (other.sa_unique_key != null)
				return false;
		} else if (!sa_unique_key.equals(other.sa_unique_key))
			return false;
		if (temporal == null) {
			if (other.temporal != null)
				return false;
		} else if (!temporal.equals(other.temporal))
			return false;
		return true;
	}

	@Override
	public Object clone() {
		try {
			StructureArrayOptions clonedObj = (StructureArrayOptions) super
					.clone();
			clonedObj.sa_attribute_file = sa_attribute_file;
			clonedObj.sa_unique_filename = sa_unique_filename;
			clonedObj.sa_unique_key = sa_unique_key;
			clonedObj.temporal = temporal;
			return clonedObj;
		} catch (CloneNotSupportedException e) {
			// this shouldn't happen, since we are Cloneable
			throw new InternalError();
		}
	}

}
